Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Node / ReticulumProjects / MeshChatX.git / files / meshchatx / src / frontend / js / NotificationUtils.js

Displaying Raw • Download


meshchatx/src/frontend/js/NotificationUtils.js 72d09e2456e5f54a7234e2a9d4a82e53ea9a6abc (72d09e24) Text, 888 B

Tff7b72class Te6edf3NotificationUtils Tb4b4b4{
Tff7b72static Te6edf3showIncomingCallNotificationTb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3NotificationTb4b4b4.Te6edf3requestPermissionTb4b4b4(Tb4b4b4)Tb4b4b4.Te6edf3thenTb4b4b4(Tb4b4b4(Te6edf3resultTb4b4b4) Tb4b4b4=> Tb4b4b4{
Tff7b72if Tb4b4b4(Te6edf3result Tff7b72=== Ta5d6ff"granted"Tb4b4b4) Tb4b4b4{
Tff7b72new Tffa657windowTb4b4b4.Te6edf3NotificationTb4b4b4(Ta5d6ff"Incoming Call"Tb4b4b4, Tb4b4b4{
Te6edf3bodyTff7b72: Ta5d6ff"Someone is calling you."Tb4b4b4,
Te6edf3tagTff7b72: Ta5d6ff"incoming_telephone_call"Tb4b4b4, T8b949e// only ever show one incoming call notification at a time
Tb4b4b4}Tb4b4b4)Tb4b4b4;
Tb4b4b4}
Tb4b4b4}Tb4b4b4)Tb4b4b4;
Tb4b4b4}

Tff7b72static Te6edf3showNewMessageNotificationTb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3NotificationTb4b4b4.Te6edf3requestPermissionTb4b4b4(Tb4b4b4)Tb4b4b4.Te6edf3thenTb4b4b4(Tb4b4b4(Te6edf3resultTb4b4b4) Tb4b4b4=> Tb4b4b4{
Tff7b72if Tb4b4b4(Te6edf3result Tff7b72=== Ta5d6ff"granted"Tb4b4b4) Tb4b4b4{
Tff7b72new Tffa657windowTb4b4b4.Te6edf3NotificationTb4b4b4(Ta5d6ff"New Message"Tb4b4b4, Tb4b4b4{
Te6edf3bodyTff7b72: Ta5d6ff"Someone sent you a message."Tb4b4b4,
Te6edf3tagTff7b72: Ta5d6ff"new_message"Tb4b4b4, T8b949e// only ever show one new message notification at a time
Tb4b4b4}Tb4b4b4)Tb4b4b4;
Tb4b4b4}
Tb4b4b4}Tb4b4b4)Tb4b4b4;
Tb4b4b4}
Tb4b4b4}

Tff7b72export Tff7b72default Te6edf3NotificationUtilsTb4b4b4;


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────